//
//  HePreferrence.m
//  HeJuBao
//
//  Created by chris on 15/10/28.
//  Copyright (c) 2015年 Chris. All rights reserved.
//

#import "HePreferrence.h"

@implementation HePreferrence

//设置是否已经显示了引导界面的标志
+(void)setShowIntroducePage:(BOOL)bShowIntroducePage {
    [self setValue:[NSNumber numberWithBool:bShowIntroducePage] forKey:@"bShowIntroducePage"];
}

//是否设置了引导页面
+(BOOL)hasShowIntroducePage {
    NSNumber *numShowIntroducePage = [self getValue:@"bShowIntroducePage"];
    if (numShowIntroducePage) {
        return [numShowIntroducePage boolValue];
    } else {
        return NO;
    }
}

+(void)setValue:(id)anObject forKey:(id)aKey{
    if (anObject == nil||[anObject class]==NULL) {
        return;
    }
    [[NSUserDefaults standardUserDefaults] setObject:anObject forKey:aKey];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

+(id)getValue:(id)aKey{
    return [[NSUserDefaults standardUserDefaults] objectForKey: aKey];
}

@end
